home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / balones.swf / scripts / DefineSprite_341 / frame_9 / DoAction_2.as next >
Encoding:
Text File  |  2013-04-24  |  2.3 KB  |  99 lines

  1. this.nMatch = 0;
  2. _root.arrInitMatch = new Array();
  3. this.arrNumber = new Array();
  4. this.arrAnimal = new Array();
  5. if(_root.isBonus == 1)
  6. {
  7.    _root.isBonus = 0;
  8.    _root.arrM[_root.strClick2.substr(0,1)][_root.strClick2.substr(1,1)] = eval("_root.mcB.mcM" + _root.strClick2).nType = eval("_root.mcB.mcM" + _root.strClick2 + ".mcM")._currentframe + 1;
  9.    a = 0;
  10.    while(a <= 7)
  11.    {
  12.       b = 0;
  13.       while(b <= 7)
  14.       {
  15.          if(_root.arrM[a][b] == eval("_root.mcB.mcM" + _root.strClick2).nType)
  16.          {
  17.             _root.arrInitMatch[this.nMatch] = String(a) + String(b);
  18.             this.nMatch = this.nMatch + 1;
  19.          }
  20.          b++;
  21.       }
  22.       a++;
  23.    }
  24. }
  25. this.nMatch = 0;
  26. d = 0;
  27. while(d < _root.arrInitMatch.length)
  28. {
  29.    isCheck = 1;
  30.    if(this.nMatch >= 1)
  31.    {
  32.       c = 0;
  33.       while(c < this.nMatch)
  34.       {
  35.          if(this.arrNumber[c] == _root.arrInitMatch[d])
  36.          {
  37.             isCheck = 0;
  38.          }
  39.          c++;
  40.       }
  41.    }
  42.    if(isCheck)
  43.    {
  44.       this.arrNumber[this.nMatch] = _root.arrInitMatch[d];
  45.       this.nDeleteAnimal = eval("_root.mcB.mcM" + this.arrNumber[this.nMatch])._currentframe - 1;
  46.       if(this.nDeleteAnimal == 1)
  47.       {
  48.          _root.mcP.nA1 = _root.mcP.nA1 + 1;
  49.       }
  50.       else if(this.nDeleteAnimal == 2)
  51.       {
  52.          _root.mcP.nA2 = _root.mcP.nA2 + 1;
  53.       }
  54.       else if(this.nDeleteAnimal == 3)
  55.       {
  56.          _root.mcP.nA3 = _root.mcP.nA3 + 1;
  57.       }
  58.       else if(this.nDeleteAnimal == 4)
  59.       {
  60.          _root.mcP.nA4 = _root.mcP.nA4 + 1;
  61.       }
  62.       else if(this.nDeleteAnimal == 5)
  63.       {
  64.          _root.mcP.nA5 = _root.mcP.nA5 + 1;
  65.       }
  66.       else if(this.nDeleteAnimal == 6)
  67.       {
  68.          _root.mcP.nA6 = _root.mcP.nA6 + 1;
  69.       }
  70.       else if(this.nDeleteAnimal == 7)
  71.       {
  72.          _root.mcP.nA7 = _root.mcP.nA7 + 1;
  73.       }
  74.       this.arrAnimal[this.nMatch] = this.nDeleteAnimal;
  75.       this.nMatch = this.nMatch + 1;
  76.    }
  77.    d++;
  78. }
  79. if(this.arrNumber.length)
  80. {
  81.    if(this.arrNumber.length == 3)
  82.    {
  83.       _root.Score += 10;
  84.    }
  85.    else if(this.arrNumber.length == 4)
  86.    {
  87.       _root.Score += 20;
  88.    }
  89.    else if(this.arrNumber.length == 5)
  90.    {
  91.       _root.Score += 30;
  92.    }
  93.    else
  94.    {
  95.       _root.Score += 40;
  96.    }
  97. }
  98. _root.mcAC3.gotoAndPlay("flC");
  99.